package com.cn.mmd.service;

import com.cn.mmd.mapper.SchoolworkMapper;
import com.cn.mmd.mapper.StudentWorkMapper;
import com.cn.mmd.model.Schoolwork;
import com.cn.mmd.model.StudentWork;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**W
 *
 */

@Service("workService")
public class WorkServiceImpl implements WorkService {

    @Autowired
    private SchoolworkMapper schoolworkMapper;

    @Autowired
    private StudentWorkMapper studentWorkMapper;

    @Override
    public Schoolwork selectByAll(Schoolwork schoolwork) {
        return schoolworkMapper.selectByAll(schoolwork);
    }

    @Override
    public int insertSelective(Schoolwork record) {
        return schoolworkMapper.insertSelective(record);
    }

    @Override
    public List<Schoolwork> selectAll(Schoolwork schoolwork) {
        return schoolworkMapper.selectAll(schoolwork);
    }

    @Override
    public int insertSelective(StudentWork record) {
        return studentWorkMapper.insertSelective(record);
    }

    @Override
    public StudentWork selectBy(StudentWork studentWork) {
        return studentWorkMapper.selectBy(studentWork);
    }

    @Override
    public List<Schoolwork> selectAlls(Schoolwork schoolwork) {
        return schoolworkMapper.selectAlls(schoolwork);
    }

    @Override
    public int selectByCount(StudentWork studentWork) {
        return studentWorkMapper.selectByCount(studentWork);
    }

    @Override
    public int updateBy(StudentWork studentWork) {
        return studentWorkMapper.updateBy(studentWork);
    }

    @Override
    public int countLimitNum(Schoolwork schoolwork) {
        return schoolworkMapper.countLimitNum(schoolwork);
    }

    @Override
    public List<StudentWork> selectByStuId(StudentWork studentWork) {
        return studentWorkMapper.selectByStuId(studentWork);
    }

    @Override
    public int countLimitNums(StudentWork studentWork) {
        return studentWorkMapper.countLimitNums(studentWork);
    }

    @Override
    public Schoolwork selectByPrimaryKey(Integer schoolworkid) {
        return schoolworkMapper.selectByPrimaryKey(schoolworkid);
    }

    @Override
    public int deleteByPrimaryKey(Integer schoolworkid) {
        return schoolworkMapper.deleteByPrimaryKey(schoolworkid);
    }

    @Override
    public int deleteBySchoolWork(StudentWork studentWork) {
        return studentWorkMapper.deleteBySchoolWork(studentWork);
    }
}
